import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '项目ID',
    align:"center",
    dataIndex: 'projectId'
   },
  {
    title: '项目名',
    align:"left",
    dataIndex: 'projectName',
    width: 400
  },
  {
    title: '项目序号',
    align:"left",
    dataIndex: 'sortNo'
  },
  {
    title: '项目类型',
    align:"center",
    dataIndex: 'applyProjectType_dictText'
  },
   {
    title: '审核状态',
    align:"center",
    dataIndex: 'applyStatus_dictText'
   },
   {
    title: '审核备注',
    align:"center",
    dataIndex: 'applyContent'
   },
  {
    title: '送审人',
    align:"center",
    dataIndex: 'applyer_dictText'
  },
/*   {
    title: '送审次数',
    align:"center",
    dataIndex: 'applyTimes'
   },*/
  {
    title: '送审时间',
    align:"center",
    dataIndex: 'sendApplyTime'
  },

   {
    title: '审核时间',
    align:"center",
    dataIndex: 'applyTime'
   },
   {
    title: '审核人',
    align:"center",
    dataIndex: 'applyUserId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '项目名称',
    field: 'projectName',
    component: 'JInput',
    colProps: { span: 4 },
  },
  {
    label: '项目序号',
    field: 'sortNo',
    component: 'JInput',
    colProps: { span: 4 },
  },
  {
    label: '项目类型',
    field: 'applyProjectType',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'applyProjectType',
      stringToNumber: true,
    },
    colProps: { span: 4 },
  },
  {
    label: '审核状态',
    field: 'applyStatus',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'applyStatus',
      stringToNumber: true,
    },
    colProps: { span: 4 },
  },
  {
    field: 'customId',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'monster_custom,name,id'
    },
    label: '所属客户',
    colProps: { span: 4 },
  },
/*  {
    label: '审核人',
    field: 'applyUserId',
    component: 'JInput',
    colProps: { span: 4 },
  },*/
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '项目ID',
    field: 'projectId',
    component: 'Input',
  },
  {
    label: '项目名称',
    field: 'projectName',
    component: 'Input',
  },
  {
    label: '项目类型',
    field: 'applyProjectType_dictText',
    component: 'Input',
  },
  {
    label: '审核状态',
    field: 'applyStatus_dictText',
    component: 'Input',
  },
  {
    label: '审核备注',
    field: 'applyContent',
    component: 'Input',
  },
  // {
  //   label: '审核状态',
  //   field: 'applyStatus',
  //   component: 'InputNumber',
  // },
  // {
  //   label: '审核备注',
  //   field: 'applyContent',
  //   component: 'Input',
  // },
  // {
  //   label: '送审次数',
  //   field: 'applyTimes',
  //   component: 'InputNumber',
  // },
  // {
  //   label: '审核时间',
  //   field: 'applyTime',
  //   component: 'DatePicker',
  //   componentProps: {
  //      showTime: true,
  //      valueFormat: 'YYYY-MM-DD HH:mm:ss'
  //    },
  // },
  // {
  //   label: '审核人',
  //   field: 'applyUserId',
  //   component: 'Input',
  // },
	// // TODO 主键隐藏字段，目前写死为ID
	// {
	//   label: '',
	//   field: 'id',
	//   component: 'Input',
	//   show: false
	// },
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
